home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 722 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.8 KB

  1. From: bousch@suntopo.matups.fr (Thierry Bousch)
  2. Subject: Re: MiNT 1.09 security: f_delete() patch
  3. Date: Fri, 17 Dec 1993 16:19:59 +0100 (MET)
  4. In-Reply-To: <199312171239.AA12156@techfac.TechFak.Uni-Bielefeld.DE> from "Torsten Scherer" at Dec 17, 93 01:39:55 pm
  5.  
  6. Hi Torsten,
  7.  
  8. >  Here's a patch which makes MiNT's f_delete() respect the sticky bit according
  9. > to the semantic how I understand it and hope it really is... Well, at least
  10. > it's better and/or a bit more secure than it is now... :-)
  11.  
  12. Hmm, if you want to support the sticky bit, you must also patch the
  13. f_rename() and f_rmdir() functions, because you shouldn't be allowed to
  14. rename/move files and subdirectories of a sticky folder. (Otherwise, it
  15. would be a big security hole: you could move files to a non-sticky
  16. folder, and delete them.)
  17.  
  18. >  It goes like this:
  19. >  If I haven't write permission to the parent directory, I loose. Otherwise,
  20. > if the sticky bit isn't set, I can delete anything regardless of its mode
  21. > or if it's mine at all. If the sticky bit is set, I can only delete a file
  22. > if it's mine, or if the whole directory is mine. In the last case I again can
  23. > delete every file in the directory.
  24.  
  25. In RAMFS 1.4, the sticky bit is implemented as follows. (The kernel has
  26. already checked permissions, but ignores the sticky bit). IF the sticky
  27. bit of the directory is set, AND if you're not the super-user, AND if
  28. your real uid is not the one of the "item" (file/subdirectory/link)
  29. you're trying to move/remove, THEN the file-system returns EACCDN.
  30.  
  31. This means that you cannot move/remove files you don't own in a
  32. directory you own, but this is not really a problem, since you can
  33. modify the permissions of your directory :-)
  34.  
  35. By the way, what is the usual semantics for the setuid and setgid flags
  36. on directories?
  37.  
  38. Thierry.
  39.